﻿using AutoDeployForSims.Service;
using AutoDeployForSims.ViewModel;
using MyUtility.Utility;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace AutoDeployForSims.View
{
    /// <summary>
    /// CFGAnalysisControl.xaml 的交互逻辑
    /// </summary>
    public partial class CFGAnalysisControl : UserControl
    {
        private CFGAnalysisControlViewModel CFGAnalysisControlVM = SingletonProvider<CFGAnalysisControlViewModel>.Instance;
        private GetConfigService getConfigService = SingletonProvider<GetConfigService>.Instance;
        public CFGAnalysisControl()
        {
            InitializeComponent();
            DataContext = CFGAnalysisControlVM;
        }

        private void SelectPathBtn_Click(object sender, RoutedEventArgs e)
        {
            CFGAnalysisControlVM.GetCFGPath();
        }

        private void StartAnalysisBtn_Click(object sender, RoutedEventArgs e)
        {
            if (CFGAnalysisControlVM.StartCFGAnalysis())
            {
                //弹出界面，给用户选择开启那些工具
                SelectSimuToolWindow newWindow = new SelectSimuToolWindow();
                newWindow.Show();
            }
            
        }

        private void ModifyEnviBtn_Click(object sender, RoutedEventArgs e)
        {

        }
    }
}
